package com.eden.inject;

import java.lang.reflect.Method;
import java.util.Scanner;

/**
 * Created by Administrator on 2017/11/15.
 */

public class T {
    public static void main(String[] args) {

        try {
            Class clazz = Class.forName("com.eden.inject.T");
//            Method[] methods = clazz.getDeclaredMethods();
//            for (Method m:methods){
//                print(m);
//            }

            Method method = clazz.getDeclaredMethod("x", String[].class);
            method.invoke(null, (Object) new String[] {});

        } catch (Exception e) {
            e.printStackTrace();
        }

        print(T.class.getCanonicalName());

    }

    public static void x(Object o) {
        print("x");
    }

    void test() {
        try {
            print(T.class.getName());
            print(T.class.getCanonicalName());

            Scanner scanner = new Scanner(getClass().getResourceAsStream("assets/test.temp"));
            String template = scanner.useDelimiter("\\A").next();
            print(template);
        } catch (Exception e) {
            e.printStackTrace();

        }
    }


    private static void print(Object o) {
        System.out.println(o);
    }
}
